qui(
    function (require, exports, module) {
        StreamSearch.Action = (function () {
            var StreamGrid = null;

            var getStreamGrid = function (options) {
                if (!StreamGrid) {
                    StreamGrid = new StreamSearch.Grid($.extend(true, {
                        '$container': $('#StreamListContainer'),
                        type: 0
                    }, options));
                }

                return StreamGrid;
            }

            var StreamGridRun = function (options) {
                StreamGrid = getStreamGrid(options);
                StreamGrid.run();

                console.log('grid run');
            }

            var run = function () {
                Ancestor.Config.EPG_AUTH.list = '/stream/search';
                StreamGridRun({});
            }

            return {
                run: run,
                getStreamGrid: getStreamGrid
            }
        })();
    }
);